import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {MatButtonModule} from '@angular/material/button';
import {MatChipsModule} from '@angular/material/chips';
import {MatRippleModule} from '@angular/material/core';
import {MatExpansionModule} from '@angular/material/expansion';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatIconModule} from '@angular/material/icon';
import {MatInputModule} from '@angular/material/input';
import {MatPaginatorModule} from '@angular/material/paginator';
import {MatSelectModule} from '@angular/material/select';
import {MatSnackBarModule} from '@angular/material/snack-bar';
import {MatSortModule} from '@angular/material/sort';
import {MatTableModule} from '@angular/material/table';
import {MatTabsModule} from '@angular/material/tabs';
import {NgxChartsModule} from '@swimlane/ngx-charts';

import {BaseSharedModule} from '@base/shared.module';
import {BaseWidgetModule} from '@base/components/widget/widget.module';

import {DatabaseComponent} from './system/database/database.component';
import {DatabaseService} from './system/database/database.service';

import {RolesModule} from './permissions/roles/roles.module';

import {BreadcrumbModule} from '../../../@base/components';
import {UsersModule} from './permissions/users/users.module';
import {SettingUserComponent} from './permissions/uesr/user.component';
import {SettingUserService} from './permissions/uesr/user.service';
import {MatTreeModule} from '@angular/material/tree';
import {CdkTreeModule} from '@angular/cdk/tree';

import {PermitModule} from './permissions/permit/permit.module';
import {MatMenuModule} from '@angular/material/menu';

const routes: Routes = [
    {
        path: 'system/database',
        component: DatabaseComponent,
        resolve: {
            data: DatabaseService
        }
    },
    {
        path: 'basic/permissions/users/:id',
        component: SettingUserComponent,
        resolve: {
            data: SettingUserService
        }
    },

];

@NgModule({
    declarations: [
        DatabaseComponent,
        SettingUserComponent

    ],
    imports: [
        RouterModule.forChild(routes),

        MatButtonModule,
        MatChipsModule,
        MatExpansionModule,
        MatFormFieldModule,
        MatIconModule,
        MatInputModule,
        MatPaginatorModule,
        MatRippleModule,
        MatSelectModule,
        MatSortModule,
        MatSnackBarModule,
        MatTableModule,
        MatTabsModule,

        NgxChartsModule,


        BaseSharedModule,
        BaseWidgetModule,
        BreadcrumbModule,
        UsersModule,
        MatTreeModule,
        CdkTreeModule,

        RolesModule,
        PermitModule,
        MatMenuModule
    ],
    providers: [
        DatabaseService,
        SettingUserService
    ]
})
export class SettingModule {
}
